

#ifndef UD_RXOBJECT_H
#define UD_RXOBJECT_H 1

#include "zrxdefs.h"
#include "zrxboiler.h"
#include "zacadstrc.h"
#pragma pack (push, 8)

#ifdef  UCDB_API
    #  define   UCDB_PORT _declspec(dllexport)
#else
    #  define   UCDB_PORT
#endif

class UcRxClass;

class ZSOFT_NO_VTABLE UcRxObject
{
public:
    virtual ~UcRxObject();

    static UcRxClass*         desc();
    static UcRxObject*        cast(const UcRxObject * inPtr);

    inline bool               isKindOf(const UcRxClass * aClass) const;

    UcRxObject*               queryX(const UcRxClass* protocolClass) const;
    UcRxObject*               x(const UcRxClass* protocolClass) const;
    virtual UcRxClass*        isA() const;

    virtual UcRxObject*       clone() const;
    virtual Ucad::ErrorStatus copyFrom(const UcRxObject* other);
    virtual ZSoft::Boolean    isEqualTo(const UcRxObject * other) const;
    virtual UcRx::Ordering    comparedTo(const UcRxObject * other) const;

protected:
    UcRxObject();
};

inline UcRxObject::~UcRxObject()
{
}

#pragma pack (pop)

#include "zrxclass.h"

#define UCRX_PE_PTR(RxObj,PEClass) PEClass::cast(RxObj-> \
                                            queryX(PEClass::desc()))

#define UCRX_X_CALL(RxObj,PEClass) PEClass::cast(RxObj->x(PEClass::desc()))

#include "zrxdict.h"

#endif
